package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/res")
@Controller //表示返回的是视图
public class ResponseController {
    @RequestMapping("/html")
    public String index(){
        return "/index.html";
    }

    @ResponseBody
    @RequestMapping("/html2")
    public String index2(){
        return "<h1> 你好 </h1>";
    }
}
